package com.jefe.service.model;

import java.io.Serializable;

import java.util.ArrayList;
import java.util.List;


/**
 * <a href="MessageTblSoap.java.html"><b><i>View Source</i></b></a>
 *
 * <p>
 * ServiceBuilder generated this class. Modifications in this class will be
 * overwritten the next time is generated.
 * </p>
 *
 * <p>
 * This class is used by
 * <code>com.jefe.service.service.http.MessageTblServiceSoap</code>.
 * </p>
 *
 * @author Brian Wing Shun Chan
 *
 * @see com.jefe.service.service.http.MessageTblServiceSoap
 *
 */
public class MessageTblSoap implements Serializable {
    private String _shortName;
    private String _heading;
    private String _message;
    private int _id;
    private String _image;

    public MessageTblSoap() {
    }

    public static MessageTblSoap toSoapModel(MessageTbl model) {
        MessageTblSoap soapModel = new MessageTblSoap();

        soapModel.setShortName(model.getShortName());
        soapModel.setHeading(model.getHeading());
        soapModel.setMessage(model.getMessage());
        soapModel.setId(model.getId());
        soapModel.setImage(model.getImage());

        return soapModel;
    }

    public static MessageTblSoap[] toSoapModels(MessageTbl[] models) {
        MessageTblSoap[] soapModels = new MessageTblSoap[models.length];

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModel(models[i]);
        }

        return soapModels;
    }

    public static MessageTblSoap[][] toSoapModels(MessageTbl[][] models) {
        MessageTblSoap[][] soapModels = null;

        if (models.length > 0) {
            soapModels = new MessageTblSoap[models.length][models[0].length];
        } else {
            soapModels = new MessageTblSoap[0][0];
        }

        for (int i = 0; i < models.length; i++) {
            soapModels[i] = toSoapModels(models[i]);
        }

        return soapModels;
    }

    public static MessageTblSoap[] toSoapModels(List<MessageTbl> models) {
        List<MessageTblSoap> soapModels = new ArrayList<MessageTblSoap>(models.size());

        for (MessageTbl model : models) {
            soapModels.add(toSoapModel(model));
        }

        return soapModels.toArray(new MessageTblSoap[soapModels.size()]);
    }

    public int getPrimaryKey() {
        return _id;
    }

    public void setPrimaryKey(int pk) {
        setId(pk);
    }

    public String getShortName() {
        return _shortName;
    }

    public void setShortName(String shortName) {
        _shortName = shortName;
    }

    public String getHeading() {
        return _heading;
    }

    public void setHeading(String heading) {
        _heading = heading;
    }

    public String getMessage() {
        return _message;
    }

    public void setMessage(String message) {
        _message = message;
    }

    public int getId() {
        return _id;
    }

    public void setId(int id) {
        _id = id;
    }

    public String getImage() {
        return _image;
    }

    public void setImage(String image) {
        _image = image;
    }
}
